import mcpi.minecraft as minecraft
import mcpi.block as block
mc = minecraft.Minecraft.create()
allIds = mc.getPlayerEntityIds()
x, y, z = mc.entity.getTilePos(allIds[1])
def golem(x,y,z):
    mc.setBlock(x+1,y,z,block.IRON_BLOCK)
    mc.setBlock(x+1,y+1,z,block.IRON_BLOCK)
    mc.setBlock(x+1,y+2,z,block.IRON_BLOCK)
    mc.setBlock(x+2,y+2,z,block.IRON_BLOCK)
    mc.setBlock(x,y+2,z,block.IRON_BLOCK)
    mc.setBlock(x+1,y+3,z,block.LIT_PUMPKIN)

golem(x,y,z)
